<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        #playerTable {
            width: 50%;
            border: 3px solid cadetblue;
            margin: 0px auto;
            text-align: center;
        }

        #playerTable th, td {
            border: 1px solid gray;
        }

        #playerTable img {
            width: 100px;
            height: 100px;
        }
    </style>
    <script src="js/jquery-1.10.2.min.js"></script>
    <script>
        $(function () {
            $.ajax({
                url: "findAllPlayer.do",
                success: function (players) {
                    $.each(players, function (i, e) {
                            $("#playerTable").append(
                                "<tr>" +
                                "<td>" + e.id + "</td>" +
                                "<td>" + e.name + "</td>" +
                                "<td>" + e.password + "</td>" +
                                "<td>" + e.nickname + "</td>" +
                                "<td><img src='" + e.photo + "'></td>" +
                                "<td><a href='download.do?photo=" + e.photo + "&filetype=" + e.filetype + "'>下载</a></td>" +
                                "</tr>"
                            )
                        }
                    )
                }
            })
        })
    </script>
</head>
<body>
<table id="playerTable">
    <tr>
        <th>id</th>
        <th>用户名</th>
        <th>密码</th>
        <th>昵称</th>
        <th>头像</th>
        <th>下载</th>
    </tr>
    <%--    <tr>--%>
    <%--        <td>1</td>--%>
    <%--        <td>张三</td>--%>
    <%--        <td>123456</td>--%>
    <%--        <td>阿三</td>--%>
    <%--        <td><img src=""></td>--%>
    <%--        <td><a/></td>--%>
    <%--    </tr>--%>
</table>
</body>
</html>
